<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="div">zh</div>
    <script src="01.js"></script>
    <script>
        function sum(num){
            return new Promise(resolve=>{
                setTimeout(() => {
                    let count = 0;
                    for(let i=0;i<num;i++){
                        count += num--;
                    }
                    resolve(count);
                }, 0);
            })
        }
        async function run(num){
           let res = await sum(num);
           console.log(res);
        }
        run(987654321);
        console.log('同步执行代码');
        let str = "admin"
        console.log(str.split(""));
    </script>
</body>
</html>